/* settings-content.css - 内容区域样式 */

/* 内容区域 - 移除动画属性 */
.settings-content {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
  background: white;
}

.settings-section.animated {
  animation: slideInLeft 0.3s ease-out;
}

/* 默认h3标题颜色 */
.settings-section h3 {
  margin: 0 0 1.5rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b; /* 深色主题以外的默认颜色 */
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* 深色主题下的h3标题颜色 */
.dark .settings-section h3 {
  color: #ffffff;
}

.settings-section h3::before {
  content: "";
  width: 4px;
  height: 20px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-radius: 2px;
}

/* 设置项样式 */
.setting-item {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.setting-item:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.setting-item label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 500;
  color: #374151;
  gap: 0.75rem;
}

.setting-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #3b82f6;
  cursor: pointer;
}

/* 下拉菜单优化样式 */
.setting-item select {
  margin-left: 0.5rem;
  padding: 0.6rem 1rem 0.6rem 0.75rem;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  background: white;
  font-size: 0.875rem;
  color: #374151;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 120px;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.setting-item select:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.15);
  transform: translateY(-1px);
}

.setting-item select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2), 0 4px 6px -1px rgba(59, 130, 246, 0.15);
  transform: translateY(-1px);
}

.setting-item select option {
  padding: 0.5rem;
  background: white;
  color: #374151;
}

/* 下拉菜单展开动画 */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px) scaleY(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

.setting-item select:focus + .select-dropdown {
  animation: slideDown 0.2s ease-out forwards;
}

/* 复选框自定义样式 */
.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  position: relative;
  transition: all 0.2s ease;
  cursor: pointer;
}

.checkbox-custom.checked {
  background: #3b82f6;
  border-color: #3b82f6;
}

.checkbox-custom.checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
  font-weight: bold;
}

/* 关于页面样式 */
.about-content {
  line-height: 1.7;
  color: #374151;
}

.about-content h4 {
  margin: 0 0 1rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
}

.about-content p {
  margin-bottom: 1rem;
  color: #6b7280;
}

.about-content a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.about-content a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.about-content .version-info {
  background: #f3f4f6;
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
}

.about-content .feature-list {
  list-style: none;
  padding: 0;
}

.about-content .feature-list li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.about-content .feature-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #3b82f6;
  font-weight: bold;
}

/* 滚动条样式 */
.settings-content::-webkit-scrollbar {
  width: 6px;
}

.settings-content::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.settings-content::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.settings-content::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* 移动端菜单列表样式 */
.menu-list {
  padding: 1rem;
  animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.menu-list h3 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #1e293b;
  font-size: 1.25rem;
  animation: slideInDown 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

/* 深色模式下的菜单列表标题 */
.dark .menu-list h3 {
  color: #ffffff;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.menu-grid-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  font-weight: 500;
  color: #374151;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  height: 60px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  /* 添加触摸设备优化 */
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  /* 背景渐变过渡优化 */
  background-size: 200% 200%;
  background-position: 0% 0%;
}

/* 菜单项交错动画 */
.menu-grid-item:nth-child(1) { animation-delay: 0.1s; }
.menu-grid-item:nth-child(2) { animation-delay: 0.15s; }
.menu-grid-item:nth-child(3) { animation-delay: 0.2s; }
.menu-grid-item:nth-child(4) { animation-delay: 0.25s; }
.menu-grid-item:nth-child(5) { animation-delay: 0.3s; }

.menu-grid-item:hover {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  background-position: 100% 100%;
  transform: translateY(-4px) scale(1.02);
  /* 发光光晕阴影特效 */
  box-shadow: 
    0 12px 32px rgba(0, 0, 0, 0.15),
    0 0 20px rgba(102, 126, 234, 0.5);
  filter: brightness(1.1);
}

/* 主题色适配的发光光晕阴影 */
.light .menu-grid-item:hover {
  box-shadow: 
    0 12px 32px rgba(0, 0, 0, 0.15),
    0 0 20px rgba(102, 126, 234, 0.5);
}

.dark .menu-grid-item:hover {
  box-shadow: 
    0 12px 32px rgba(0, 0, 0, 0.15),
    0 0 20px rgba(255, 255, 255, 0.5);
}

.blue .menu-grid-item:hover {
  box-shadow: 
    0 12px 32px rgba(0, 0, 0, 0.15),
    0 0 20px rgba(33, 150, 243, 0.5);
}

.green .menu-grid-item:hover {
  box-shadow: 
    0 12px 32px rgba(0, 0, 0, 0.15),
    0 0 20px rgba(76, 175, 80, 0.5);
}

.purple .menu-grid-item:hover {
  box-shadow: 
    0 12px 32px rgba(0, 0, 0, 0.15),
    0 0 20px rgba(156, 39, 176, 0.5);
}

.menu-grid-item:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  animation: menuClick 0.3s ease-out;
}

/* 点击动画关键帧 */
@keyframes menuClick {
  0% {
    transform: scale(1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }
  50% {
    transform: scale(0.95);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }
}

/* 微光效果动画 */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* 悬停微光效果 */
.menu-grid-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border-radius: 12px;
}

.menu-grid-item:hover::before {
  opacity: 1;
  animation: shimmer 1.5s ease-in-out infinite;
}

/* 深色模式下的菜单网格项 */
.dark .menu-grid-item {
  background: linear-gradient(135deg, #333333 0%, #222222 100%);
  border: 1px solid #444444;
  color: #cccccc;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.dark .menu-grid-item:hover {
  background: linear-gradient(135deg, #444444 0%, #333333 100%);
  background-position: 100% 100%;
  box-shadow: 
    0 8px 20px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(255, 255, 255, 0.5);
  filter: brightness(1.1);
}

/* 为触摸设备添加额外的点击反馈 */
@media (hover: none) and (pointer: coarse) {
  .menu-grid-item:active {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%) !important;
    transform: scale(0.95) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    animation: none;
  }
  
  .dark .menu-grid-item:active {
  background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%) !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4) !important;
}
  
  .blue .menu-grid-item:active {
    background: linear-gradient(135deg, #90caf9 0%, #64b5f6 100%) !important;
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3) !important;
  }
  
  .green .menu-grid-item:active {
    background: linear-gradient(135deg, #a5d6a7 0%, #81c784 100%) !important;
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3) !important;
  }
  
  .purple .menu-grid-item:active {
    background: linear-gradient(135deg, #e1bee7 0%, #ce93d8 100%) !important;
    box-shadow: 0 4px 8px rgba(156, 39, 176, 0.3) !important;
  }
}

.menu-grid-text {
  font-size: 0.875rem;
}

/* 移动端响应式调整 */
/* 移动端菜单列表样式 */
@media (max-width: 768px) {
  .settings-modal {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
  }
  
  .settings-header {
    padding: 1rem 1.5rem;
  }
  
  .settings-body {
    flex-direction: column;
  }
  
  .settings-content {
    padding: 1rem;
  }
  
  .menu-grid {
    grid-template-columns: 1fr;
  }
  
  /* 当显示菜单列表时，调整内容区域样式 */
  .settings-content.menu-list-view {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

/* 小屏幕设备进一步调整 */
@media (max-width: 480px) {
  .menu-grid-item {
    padding: 1.25rem 0.75rem;
  }
  
  .menu-grid-icon {
    font-size: 1.25rem;
  }
  
  .menu-grid-text {
    font-size: 0.8125rem;
  }
}

/* 菜单网格项在不同主题下的适配 */
.blue .menu-grid-item {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border: 1px solid rgba(33, 150, 243, 0.2);
  color: #0d47a1;
}

.blue .menu-grid-item:hover {
  background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%);
  background-position: 100% 100%;
  box-shadow: 0 8px 16px rgba(33, 150, 243, 0.3);
  filter: brightness(1.05);
}

.green .menu-grid-item {
  background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
  border: 1px solid rgba(76, 175, 80, 0.2);
  color: #2e7d32;
}

.green .menu-grid-item:hover {
  background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
  background-position: 100% 100%;
  box-shadow: 0 8px 16px rgba(76, 175, 80, 0.3);
  filter: brightness(1.05);
}

.purple .menu-grid-item {
  background: linear-gradient(135deg, #e8d5f2 0%, #f3e5f5 100%);
  border: 1px solid rgba(156, 39, 176, 0.2);
  color: #6a1b9a;
}

.purple .menu-grid-item:hover {
  background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
  background-position: 100% 100%;
  box-shadow: 0 8px 16px rgba(156, 39, 176, 0.3);
  filter: brightness(1.05);
}